home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2000 September / maximum-cd-2000-09.iso / Vampire the Masquerade / vampire_demo.exe / Codex.nob / CodexSound.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-22  |  2.0 KB  |  67 lines

  1. public class CodexSound extends Codex {
  2.    public static String aMusicName = "";
  3.    public static int musicVolume;
  4.  
  5.    public static native boolean StartMusic(String var0, int var1);
  6.  
  7.    public static native void StopMusic();
  8.  
  9.    public static void PushMusic(String name, int volume) {
  10.       aMusicName = GetMusicName();
  11.       musicVolume = GetMusicVolume();
  12.       StopMusic();
  13.       StartMusic(name, volume);
  14.    }
  15.  
  16.    public static void PopMusic() {
  17.       StopMusic();
  18.       StartMusic(aMusicName, musicVolume);
  19.    }
  20.  
  21.    public native void Stop();
  22.  
  23.    public static native int GetMusicVolume();
  24.  
  25.    public static native void SetAmbientVolume(int var0);
  26.  
  27.    public static native String GetMusicName();
  28.  
  29.    public static native int GetAmbientVolume();
  30.  
  31.    public CodexSound(String name, int volume, int pan, int flags, int clientGuid) {
  32.       super.guid = this.CreateLocal(((Codex)this).GetGUID(), name, volume, pan, flags, clientGuid);
  33.    }
  34.  
  35.    private native int CreateLocal(int var1, String var2, int var3, int var4, int var5, int var6);
  36.  
  37.    public CodexSound(String name, float minDist, float maxDist, int volume, int pan, int flags, int thingGuid) {
  38.       super.guid = this.CreateAtThing(((Codex)this).GetGUID(), name, minDist, maxDist, volume, pan, flags, thingGuid);
  39.    }
  40.  
  41.    private native int CreateAtPos(int var1, String var2, float var3, float var4, int var5, int var6, int var7, float[] var8);
  42.  
  43.    private native int CreateAtThing(int var1, String var2, float var3, float var4, int var5, int var6, int var7, int var8);
  44.  
  45.    public CodexSound(String name, float minDist, float maxDist, int volume, int pan, int flags, float[] position) {
  46.       super.guid = this.CreateAtPos(((Codex)this).GetGUID(), name, minDist, maxDist, volume, pan, flags, position);
  47.    }
  48.  
  49.    public CodexSound(String name, float minDist, float maxDist, int volume, int pan, int flags, float x, float y, float z) {
  50.       float[] pos = new float[3];
  51.       pos[0] = x;
  52.       pos[1] = y;
  53.       pos[2] = z;
  54.       super.guid = this.CreateAtPos(((Codex)this).GetGUID(), name, minDist, maxDist, volume, pan, flags, pos);
  55.    }
  56.  
  57.    public static native String GetAmbientName();
  58.  
  59.    public static native float PlayVoice(int var0, String var1, int var2);
  60.  
  61.    public static native boolean StartAmbient(String var0, int var1);
  62.  
  63.    public static native void StopAmbient();
  64.  
  65.    public static native void SetMusicVolume(int var0);
  66. }
  67.